package com.happe.foodeasy.winter.conf.parser;

/**
 * This class is used to collect all information of parsing result for
 * winter configuration file.
 * Created by wubin on 2016-05-18.
 */
public class ConfInformationParseResult {
    private String entityPath;
    private String databaseName;

    private ConfInformationParseResult(Builder builder) {
        this.entityPath = builder.entityPath;
        this.databaseName = builder.databaseName;
    }

    public String[] retrieveTargetPackageNames() {
        return entityPath.split(";");
    }

    public String getDatabaseName() {
        return databaseName;
    }


    public static class Builder {
        private String entityPath;
        private String databaseName;

        public void setEntityPath(String entityPath) {
            this.entityPath = entityPath;
        }

        public void setDatabaseName(String databaseName) {
            this.databaseName = databaseName;
        }

        public ConfInformationParseResult build() {
            return new ConfInformationParseResult(this);
        }
    }
}
